package com.dayouzi.crawler_monitor.mapper;

import com.dayouzi.crawler_monitor.pojo.entity.FileJson2;
import com.dayouzi.crawler_monitor.pojo.query.AddDataQuery;
import com.dayouzi.crawler_monitor.pojo.query.CrawlerDataQuery;
import com.dayouzi.crawler_monitor.pojo.query.CrawlerDataUpdateVO;
import com.dayouzi.crawler_monitor.pojo.vo.CrawlerDataVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Mapper
@Repository
public interface CrawlerDetailMapper {
    CrawlerDataVO getCrawlerDataById(CrawlerDataQuery crawlerDataQuery);

    int updateCommit(CrawlerDataUpdateVO crawlerDataUpdateVO);

    int updateIntro(@Param("id") Integer id, @Param("tableName") String tableName, @Param("intro") String intro);

    int updateInfo(@Param("id") Integer id, @Param("tableName") String tableName, @Param("info") String info);

    int addData(AddDataQuery addDataQuery);

    ArrayList<CrawlerDataVO> getCrawlerDataByList(@Param("tableName") String tableName, @Param("ids") ArrayList<Integer> ids);
}
